package sgi.message;

/**sets query applying for registration*/
public class MessageRegister extends Message {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private boolean valid;
	private String notif;
	private String username;
	private String qcustomer;
	/**constructor receives registration info and sets the query accordingly*/
	public MessageRegister(String username,String password,String fname,String lname,String email,String phone,String balance)
	{
		super("insert into users values ('"+username + "','" + password + "','0','1')");
		setQcustomer("insert into customers values ('"+username+"','"+fname+"','"+lname+"','"+phone+"','"+email+"',"+Float.valueOf(balance)+")");
		this.setUsername(username);
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public boolean isValid() {
		return valid;
	}

	public void setStatus(boolean valid) {
		this.valid = valid;
	}

	public String getNotif() {
		return notif;
	}

	public void setNotif(String notif) {
		this.notif = notif;
	}

	public String getQcustomer() {
		return qcustomer;
	}

	public void setQcustomer(String qcustomer) {
		this.qcustomer = qcustomer;
	}

}
